<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button>按钮</button>
    <script>
        setTimeout(()=>{
            console.log('定时器函数',this);           
        },1000)

        const btn = document.querySelector('button')
        btn.onclick = ()=>{
            console.log('btn点击（onclick）',this);
            
        }
        btn.addEventListener('click',()=>{
            console.log('btn的点击（addlistner）',this);
            
        })

        let names = ["abc", "cba", "nba"];
        names.forEach(function(item) {
        console.log("forEach:", this);
        }, "aaaa");
    </script>
</body>
</html>